package com.etc.delivery.dao.warehouse;

import com.etc.delivery.entity.MailType;
import com.etc.delivery.entity.Warehouse;
import com.etc.delivery.entity.Waybill;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IWarehouseDao {

    public List<Warehouse> login(Warehouse warehouse);

    public List<Waybill> queryAllBywaybill_no(@Param("waybill_no") int waybill_no, @Param("warehouse_id") Integer warehouse_id);

    public List<Waybill> queryAllByAjax(
            @Param("waybillNo") int waybillNo
            , @Param("mailType") String mailType
            , @Param("senderName") String senderName, @Param("senderPhone") String senderPhone,
            @Param("senderAddress") String senderAddress, @Param("recipientName") String recipientName,
            @Param("recipientPhone") String recipient_phone, @Param("recipientAddress") String recipientAddress,
            @Param("mainCost") String mainCost, @Param("status") int status, @Param("warehouse_id") Integer warehouse_id
    );

    public boolean addWaybill(int waybillNo);

    public int deleteWaybill(int waybill_no);

    public boolean updateByStatus(int waybill_no);

    public boolean updateWaybill(
            @Param("mailType") int mail_type
            , @Param("senderName") String sender_name, @Param("senderPhone") String sender_phone,
            @Param("senderAddress") String sender_address, @Param("recipientName") String recipient_name,
            @Param("recipientPhone") String recipient_phone, @Param("recipientAddress") String recipient_address
            , @Param("mailCost") int mail_cost, @Param("waybillNo") int waybillNo);

    public List<MailType> queryMailName();
}
